// 导入 mongoose
const mongoose = require('mongoose');

// 创建 文档 模式对象
const AccountSchema = mongoose.Schema({
    title: {
        type: String,
        required: true
    },
    time: Date,
    type: {
        type: Number,
        default: -1
    },
    account: {
        type: Number,
        required: true
    },
    remark: String
})

// 创建模型对象
const AccountModel = mongoose.model("accounts", AccountSchema);

// 暴露模型对象
module.exports = AccountModel;